package netty.client;

/**
 * Created by luoqifei on 16-12-30.
 */
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.ServerSocket;
import java.net.Socket;

//for test
public class JavasocketServer {
    private Socket socket;
    private ServerSocket ss;

    public JavasocketServer() throws IOException {
        ss = new ServerSocket(7878);
        while (true) {
            socket = ss.accept();
            BufferedReader br = new BufferedReader(new InputStreamReader(socket
                    .getInputStream()));
            System.out.println("you input is : " + br.readLine());
        }
    }

    public static void main(String[] args) {
        try {
            new JavasocketServer();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
